package bairui.international.console.web.controller.personnel.position;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.servlet.ModelAndView;

import com.lianjing.sh.project.config.web.Project_Config_Web_PageTemplate;
import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.module.context.ModuleContext;
import com.lianjing.sh.spring.web.controller.enhance.navigations.context.NavigationContext;

import bairui.international.console.web.controller.personnel.C_Personnel_Index_Left;


/**
 * @generated
 *
 * C_Personnel_Position_AddAccess
 *
 */
@Controller
public class C_Personnel_Position_AddAccess
 extends SC_Personnel_Position_AddAccess 
{
	

	/**
	 * 访问添加页面
	 */
	@Action(AddAccess.class)
	@GetMapping(AddAccess.RequestMappingValue)
	public ModelAndView addAccess(
		ModelMap map, HttpServletRequest request,
		NavigationContext navigationContext, ModuleContext moduleContext, 
		@PathVariable(name=AddAccess.PathVariableName.ParentId) Long parentId
	) throws Exception {
		/* 侧边栏 */
		C_Personnel_Index_Left.importPage(map);
		/* 模块 */
		moduleContext
			.addModule(this.module_Add.module(
					new C_Personnel_Position_Add.Add.Operate() {
						@Override public Object getParentId() { return parentId; }
						public com.lianjing.sh.spring.web.controller.base.operate.OperateSupport returnTo() {
							return new C_Personnel_Position_TreeAccess.TreeAccess.Operate() {
								@Override public Object getParentId() {
									return null;
								}
							};
						};
					}
				));
		//
		return Project_Config_Web_PageTemplate.Admin_Common(request);
	}
	

}


